﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:controlsPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:eim="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" 
    xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    x:Class="Zombsquare.MainPage" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="PanoramaStyle1" TargetType="controls:Panorama">
			<Setter Property="ItemsPanel">
				<Setter.Value>
					<ItemsPanelTemplate>
						<controlsPrimitives:PanoramaPanel x:Name="panel"/>
					</ItemsPanelTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="controls:Panorama">
						<Grid>
							<Grid.RowDefinitions>
								<RowDefinition Height="auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<controlsPrimitives:PanningBackgroundLayer x:Name="BackgroundLayer" HorizontalAlignment="Left" Grid.RowSpan="2">
								<Border x:Name="background" CacheMode="BitmapCache">
									<MediaElement Source="/EduFelicitacion1.mp4" Margin="0,0,-1000,0"/>
								</Border>
							</controlsPrimitives:PanningBackgroundLayer>
							<controlsPrimitives:PanningTitleLayer x:Name="TitleLayer" CacheMode="BitmapCache" ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" FontSize="187" FontFamily="{StaticResource PhoneFontFamilyLight}" HorizontalAlignment="Left" Margin="10,-76,0,9" Grid.Row="0"/>
							<controlsPrimitives:PanningLayer x:Name="ItemsLayer" HorizontalAlignment="Left" Grid.Row="1">
								<ItemsPresenter x:Name="items"/>
							</controlsPrimitives:PanningLayer>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
		<DataTemplate x:Key="ItemTemplate">
			<Grid Width="408" Height="43">
				<!--<TextBlock Text="{Binding Tipo}"/>-->
				<TextBlock Text="{Binding Location, Converter={StaticResource DistanceConverter}}" HorizontalAlignment="Left" Width="100" />
				<TextBlock Text="{Binding Titulo}" Margin="104,0,0,0" HorizontalAlignment="Left" Width="304" Style="{StaticResource PhoneTextLargeStyle}"/>
			</Grid>
		</DataTemplate>
        
		<Style x:Key="PanoramaStyle2" TargetType="controls:Panorama">
			<Setter Property="ItemsPanel">
				<Setter.Value>
					<ItemsPanelTemplate>
						<controlsPrimitives:PanoramaPanel x:Name="panel"/>
					</ItemsPanelTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="controls:Panorama">
						<Grid>
							<Grid.RowDefinitions>
								<RowDefinition Height="auto"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<controlsPrimitives:PanningBackgroundLayer x:Name="BackgroundLayer" HorizontalAlignment="Left" Grid.RowSpan="2">
								<Border x:Name="background" Background="{TemplateBinding Background}" CacheMode="BitmapCache">
									<!--<MediaElement Source="/EduFelicitacion1.mp4"/>-->
								</Border>
							</controlsPrimitives:PanningBackgroundLayer>
							<controlsPrimitives:PanningTitleLayer x:Name="TitleLayer" CacheMode="BitmapCache" ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" FontSize="187" FontFamily="{StaticResource PhoneFontFamilyLight}" HorizontalAlignment="Left" Margin="10,-76,0,9" Grid.Row="0"/>
							<controlsPrimitives:PanningLayer x:Name="ItemsLayer" HorizontalAlignment="Left" Grid.Row="1">
								<ItemsPresenter x:Name="items"/>
						
							</controlsPrimitives:PanningLayer>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Name="LittleZombieAnim" AutoReverse="True" RepeatBehavior="Forever">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:20" Value="351"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut" Oscillations="30"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:20" Value="4.5">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut" Oscillations="30"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="rectangleRadiactive" AutoReverse="True" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle1">
				<EasingColorKeyFrame KeyTime="0" Value="#78FFFFFF"/>
				<EasingColorKeyFrame KeyTime="0:0:0.5" Value="#78878787"/>
				<EasingColorKeyFrame KeyTime="0:0:1.1" Value="#78FFFFFF"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
	<i:Interaction.Triggers>
		<i:EventTrigger EventName="Loaded">
			<eim:ControlStoryboardAction Storyboard="{StaticResource LittleZombieAnim}"/>
			<eim:ControlStoryboardAction Storyboard="{StaticResource rectangleRadiactive}"/>
		</i:EventTrigger>
	</i:Interaction.Triggers>
 
    <!--Panorama-based applications should not show an ApplicationBar-->

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

	<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
 
        <!--Panorama control-->
        <controls:Panorama x:Name="panorama" Title="ZOMBSQUARE" Style="{StaticResource PanoramaStyle2}">
        	<controls:Panorama.Background>
        		<ImageBrush Stretch="Fill" ImageSource="PanoramaBackground.jpg"/>
        	</controls:Panorama.Background>
             
            <!--Panorama item two-->
    <!--Panorama item one-->
            <controls:PanoramaItem Header="indice">
            	<Grid>           		
                    <Canvas Margin="8,8,0,0" Height="53" VerticalAlignment="Top" x:Name="MenuGuia" Tap="MenuGuia_Tap">
                        <!--<Image Height="48"  Source="Images/appbar.basecircle.rest.png" Stretch="Fill"  Width="48"/>-->
    <!--<TextBlock Text="i" FontSize="32" Canvas.Left="20"/>-->
                        <TextBlock Text="guia de supervivencia" Style="{StaticResource PhoneTextLargeStyle}" Margin="0" Width="342" Height="53"/>
                    </Canvas>
                    
                    <Canvas Margin="8,88,0,0" Height="53" VerticalAlignment="Top" x:Name="MenuTrivial" Tap="MenuTrivial_Tap">
                        <!--<Image Height="48"  Source="Images/appbar.basecircle.rest.png" Stretch="Fill"  Width="48"/>-->
    <!--<TextBlock Text="i" FontSize="32" Canvas.Left="20"/>-->
                        <TextBlock Text="trivial" Style="{StaticResource PhoneTextLargeStyle}" Margin="0" Width="342" Height="53"/>
                    </Canvas>

                    <Canvas Margin="8,168,0,0" Height="53" VerticalAlignment="Top" x:Name="MenuMapa" Tap="MenuMapa_Tap">
                        <!--<Image Height="48"  Source="Images/appbar.basecircle.rest.png" Stretch="Fill"  Width="48"/>-->
    <!--<TextBlock Text="i" FontSize="32" Canvas.Left="20"/>-->
                        <TextBlock Text="mapa" Style="{StaticResource PhoneTextLargeStyle}" Margin="0" Width="342" Height="53"/>
                    </Canvas>
                    
                    <Canvas Margin="8,248,0,0" Height="53" VerticalAlignment="Top" x:Name="AR" Tap="AR_Tap">
                        <!--<Image Height="48"  Source="Images/appbar.basecircle.rest.png" Stretch="Fill"  Width="48"/>
                        <TextBlock Text="i" FontSize="32" Canvas.Left="20"/>-->
					<TextBlock Text="zombie escaner" Style="{StaticResource PhoneTextLargeStyle}" Margin="0" Width="342" Height="53"/>
					</Canvas>

                    <Canvas Margin="8,327,0,0" Height="53" VerticalAlignment="Top" x:Name="Bestiario" Tap="Bestiario_Tap">
                        <!--<Image Height="48"  Source="Images/appbar.basecircle.rest.png" Stretch="Fill"  Width="48"/>
                        <TextBlock Text="i" FontSize="32" Canvas.Left="20"/>-->
                        <TextBlock Text="bestiario" Style="{StaticResource PhoneTextLargeStyle}" Margin="0" Width="342" Height="53" />
                    </Canvas>

                </Grid>
            	</controls:PanoramaItem>
 
            <!--Use 'Orientation="Horizontal"' to enable a panel that lays out horizontally-->
            <controls:PanoramaItem Header="escaner">
                <ListBox x:Name="ListaScanner" ItemTemplate="{StaticResource ItemTemplate}" ItemsSource="{Binding Pushpins}" SelectionChanged="ListBox_SelectionChanged" Margin="0,0,8,16"/>
            </controls:PanoramaItem>
            
            
            <controls:PanoramaItem Header="zombrex">
                <Grid>
                    <Grid.RowDefinitions>
                    	<RowDefinition Height="203" />
                    	<RowDefinition Height="155" />
                    	<RowDefinition Height="140" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                    	<ColumnDefinition Width="106" />
                    	<ColumnDefinition Width="157" />
                    	<ColumnDefinition Width="157" />
                    </Grid.ColumnDefinitions>
                    <Rectangle Height="{Binding DosisZbrex, Converter={StaticResource ZBrexConverter}}" HorizontalAlignment="Left" Margin="3,0,0,0" x:Name="rectangle1" StrokeThickness="0" VerticalAlignment="Bottom" Width="92" Fill="#78FFFFFF" Stroke="Transparent" Grid.RowSpan="3"/>
                    <Image Margin="-140,-60,0,0" Source="/Zombsquare;component/Images/zombrex.png" Grid.ColumnSpan="3" Grid.RowSpan="3" />
                    <Image Source="/Zombsquare;component/Images/farmacias.jpg" Grid.Column="1" Height="133" HorizontalAlignment="Left" Margin="9,18,0,0" x:Name="rectangle2" VerticalAlignment="Top" Width="133" Tap="rectangle2_Tap">
                        <toolkit:ContextMenuService.ContextMenu>
                            <toolkit:ContextMenu>
                                <toolkit:MenuItem Header="Anclar al Inicio" Click="MenuItem_Click"/>
                            </toolkit:ContextMenu>
                        </toolkit:ContextMenuService.ContextMenu>
                    </Image>
                    <Image Source="/Zombsquare;component/Images/configuracion.jpg" Grid.Column="2" Height="133" HorizontalAlignment="Left" Margin="9,18,0,0" x:Name="rectangle3" VerticalAlignment="Top" Width="133">
                    	<i:Interaction.Triggers>
                    		<i:EventTrigger EventName="MouseLeftButtonDown">
                    			<ec:NavigateToPageAction TargetPage="/Pages/Zombrex/ConfigurationPage.xaml"/>
                    		</i:EventTrigger>
                    	</i:Interaction.Triggers>
                    </Image>
                    
                    <!--<Rectangle Grid.Column="2" Height="133" HorizontalAlignment="Left" Margin="5,18,0,0" Name="rectangle3" StrokeThickness="0" VerticalAlignment="Top" Width="133" Fill="White"/>-->
                    <Image Source="/Zombsquare;component/Images/Zombrex.jpg" Grid.Column="1" Grid.Row="1" Height="133" HorizontalAlignment="Left" Margin="9,18,0,0" x:Name="rectangle4" VerticalAlignment="Top" Width="133" Tap="rectangle4_Tap"/>
                    <Image Source="/Zombsquare;component/Images/traptrap.jpg" Grid.Column="2" Grid.Row="1" Height="133" HorizontalAlignment="Left" Margin="9,18,0,0" x:Name="rectangle5" VerticalAlignment="Top" Width="133" Tap="rectangle5_Tap"/>
                    <TextBlock Grid.Column="1" Height="40" Margin="9,0,15,8" TextWrapping="Wrap" Text="FARMACIAS" VerticalAlignment="Bottom" Style="{StaticResource PhoneTextBlockBase}" FontFamily="Segoe WP Black" FontSize="14.667"/>
                    <TextBlock Grid.Column="2" Height="40" Margin="8,0,16,8" TextWrapping="Wrap" Text="CONFIGURACION" VerticalAlignment="Bottom" Style="{StaticResource PhoneTextBlockBase}" FontFamily="Segoe WP Black" FontSize="14.667"/>
                    <TextBlock Grid.Column="1" Height="40" Margin="9,8,15,0" TextWrapping="Wrap" Text="GUIA DE USO" VerticalAlignment="Top" Style="{StaticResource PhoneTextBlockBase}" FontFamily="Segoe WP Black" FontSize="14.667" Grid.Row="2"/>
                    <TextBlock Grid.Column="2" Height="40" Margin="9,8,15,0" TextWrapping="Wrap" Text="ATRAPA AL ZOMBIE" VerticalAlignment="Top" Style="{StaticResource PhoneTextBlockBase}" FontFamily="Segoe WP Black" FontSize="14.667" Grid.Row="2"/>                                           
                </Grid>
            	
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="acerca de">
                <StackPanel>
                    <TextBlock Text="Zombsquare 0.1" Style="{StaticResource PhoneTextLargeStyle}"/>
                    <TextBlock Text="Information Here" Style="{StaticResource PhoneTextNormalStyle}"/>
                    
                    <TextBlock Text="Zodiac Games Studio" Style="{StaticResource PhoneTextLargeStyle}" Margin="12,20,12,0"/>
                	<TextBlock Text="Information Here" Style="{StaticResource PhoneTextNormalStyle}"/>
                    
                    <TextBlock Text="configuracion" Style="{StaticResource PhoneTextLargeStyle}" Margin="12,20,12,0"/>
                	<TextBlock Text="configura tu aplicación" Style="{StaticResource PhoneTextNormalStyle}"/>

                    <TextBlock Text="sugerencias" Style="{StaticResource PhoneTextLargeStyle}" Margin="12,20,12,0"/>
                	<TextBlock Text="¿Que te gustaría que tuviera la aplicación?" Style="{StaticResource PhoneTextNormalStyle}"/>

                </StackPanel>
            </controls:PanoramaItem>
        </controls:Panorama>
        <Image x:Name="image" Height="213" Source="Images/LittleZombie.png" Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="130" Margin="0,0,0,-18" RenderTransformOrigin="0.5,0.5">
        	<Image.RenderTransform>
        		<CompositeTransform/>
        	</Image.RenderTransform>
        </Image>
    </Grid>

</phone:PhoneApplicationPage>